package com.yixun.qfbao.weappmessage;

public enum WeAppMessageTypeEnum {

    TYPE_1(1,"报备审核成功"),
    TYPE_2(2,"报备审核驳回"),
    TYPE_3(3,"报备到访及交易"),
    TYPE_4(4,"报备交易失败");

    final private Integer code;

    final private String value;

    WeAppMessageTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValByCode(Integer code) {
        for (WeAppMessageTypeEnum messageTypeEnum : WeAppMessageTypeEnum.values()) {
            if (code.equals(messageTypeEnum.getCode())) {
                return messageTypeEnum.getValue();
            }
        }
        return null;
    }
    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
